// 搜索模块接口
// 一、导入axios
import axios from '@/utils/request'

// 二、导出方法
// 1.1 获取联想建议
export const getSuggestion = q => {
  return axios({
    method: 'get',
    url: '/v1_0/suggestion',
    params: { q },
  })
}

// 1.2 获取搜索结果
export const getSearchResult = (q, page = 1) => {
  return axios({
    method: 'get',
    url: '/v1_0/search',
    params: { q, page },
  })
}
